/** @file ReplayController
    @class ReplayController
    @brief On creation plays a replay

    Loads a replay and for each frame applies that frames commands
*/
#ifndef _ReplayController_h_
#define _ReplayController_h_

#include "Controller.h"
#include "DataPacker.h"
#include "Command.h"
#include <list>

class ReplayController : public Controller {
public:
	/**
	* The empty constructor
	*/
	ReplayController ();
	
	/**
	* The constructor
	*/
	ReplayController (Model *model);
	
	/**
	* The deconstructor
	*/
	virtual ~ReplayController ();
	
	/**
	* Handles reading of commands and applying them each update
	*/
	virtual bool update(float deltaTime);

private:
	/**
	* The packer from which it reads the replay
	*/
	DataPacker *reader;
	
	/**
	* Internal list representation of each a frames commands
	*/
	list<Command*> m_commands;
};

#endif